<?php
namespace Common\Model;
use Think\Model;
class CategoryPinModel extends Model{
	protected $_validate = array(
		array('uid,nature,topclass,category,trade,district,education,experience,minwage,maxwage,map_x,map_y,refreshtime,setmeal_id','identicalNull','',0,'callback'),
		array('uid,nature,topclass,category,trade,education,experience,minwage,maxwage,map_x,map_y,refreshtime,setmeal_id','identicalEnum','',0,'callback'),

	);
	protected $_auto = array ( 
		array('stick',0),//推荐职位
		array('emergency',0),//紧急招聘
		array('sex',3),//性别
		array('scale',0),//公司规模
	);

    /**
     * @desc 获取招聘类别
     * @return mixed
     */
	public static function get_cate_list()
    {
        $user_info=C('visitor');
     //  $user_info['utype']=3;
        $where['display']=1;
      //  var_dump($user_info);die;
        if($user_info['utype']!=3){
           $where['id']=['not in',[5,6]];
        }else{
           $where['id']=['not in',[6]];
        }

        $list=M('category_pin')->where($where)->select();
        return $list;
    }
}
?>